fn main() {
  #[cfg(feature = "cmd")]
  {
    use std::time::Duration;

    use e_utils::cmd::{tasks::sync::CmdManage, Cmd};

    use std::time::Instant;

    let cmd_manage = CmdManage::new(8);
    for _ in 0..1000 {
      cmd_manage
        .add_cmd(Cmd::new("echo").arg("Performance test".to_string()))
        .unwrap();
    }

    let start = Instant::now();
    cmd_manage.run().unwrap();
    let duration = start.elapsed();

    println!("Time taken to run 1000 commands: {:?}", duration);
    assert!(
      duration < Duration::from_secs(10),
      "Performance test took too long"
    );
  }
}
